package com.wa.annotations.conditions;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

//类中组件统一设置。满足当前条件，这个类中配置的所有bean注册才能生效；
@Conditional({WindowsCondition.class})
@Configuration
public class ConditionClassConfig {
    @Bean("person")
    public Person person() {
        return new Person("Bill Gates", 62, "1");
    }
}